/**
 * 
 */
package Monopol;

import Player.Player;

/**
 * @author Avia Tam
 * @author Assaf Miron
 *
 */
public class MonopolExceptions {

    /**
	 * Describes a General Monopoly Error
	 * @author Avia Tam
	 * @author Assaf Miron
	 *
	 */
	@SuppressWarnings("serial")
     public static class MonopolErrors extends Exception{
        String message;

        public MonopolErrors(String errorMessage) {
            super(errorMessage);
            message = errorMessage;
        }

    }


	/**
	 * Describes an Insufficient Funds Error 
	 * @author Avia Tam
	 * @author Assaf Miron
	 *
	 */
	@SuppressWarnings("serial")
	static public class InsufficientFunds extends Exception
	{
		String message;
		
		/**
		 * Default Constructor
		 */
		public InsufficientFunds()
		{
			super("Insufficient Funds"); // Call Super Class Constructor
			message = "Insufficient Funds"; // Save the Error message
		}
		
		/**
		 * @param message A Custom Error message
		 */
		public InsufficientFunds(String message)
		{
			super(message); // Call Super Class Constructor
			this.message = message; // Save the Error message 
		}
	}
	
	@SuppressWarnings("serial")
	static public class WrongCardType extends Exception
	{
		String message;
		
		/**
		 * Default Constructor
		 */
		public WrongCardType()
		{
			super("Wrong Card Type"); // Call Super Class Constructor
			message = "Wrong Card Type"; // Save the Error message
		}
		
		/**
		 * @param message A Custom Error message
		 */
		public WrongCardType(String message)
		{
			super(message); // Call Super Class Constructor
			this.message = message; // Save the Error message 
		}
	}
	
	@SuppressWarnings("serial")
	static public class NoAssets extends Exception
	{
		public NoAssets()
		{
			// Call Super Class Constructor with a message
			super("Player has a debt to pay and no Assets.\nPlayer Looses!");
		}
	}
	
	@SuppressWarnings("serial")
	static public class PlayerQuits extends Exception
	{
		public PlayerQuits()
		{
			// Call Super Class Constructor with a message
			super("The Player wants to Quit the Game.\nPlayer Looses!");
		}
	}
	@SuppressWarnings("serial")
	static public class PlayerForcedtoQuit extends Exception
	{
		public PlayerForcedtoQuit()
		{
			// Call Super Class Constructor with a message
			super("Too many auction \nPlayer Looses!");
		}
	}
	
	@SuppressWarnings("serial")
	static public class DeletePlayer extends Exception
	{
		public Player deletedPlayer;
		public DeletePlayer(Player deletedPlayer)
		{
			// Call Super Class Constructor with a message
			super();	
			// Set as the Deleted Player
			this.deletedPlayer = deletedPlayer;
		}
	}

}
